/*
 * Board.h
 *
 * Created: 22/08/2013 15:42:15
 *  Author: marionse
 */ 


#ifndef BOARD_H_
#define BOARD_H_

#include <avr/io.h>
#include "ModLed.h"
#include "cluster_library.h"

#include "FamServo.h"

/************************************************************************/
/* LED                                                                  */
/************************************************************************/

enum {
	LED_ORANGE,
	LED_VERTE,
	NB_LED
};
extern SLedConfig ledConfig[NB_LED];

/************************************************************************/
/* RF                                                                   */
/************************************************************************/

/**
* \brief Configuration de la liaison avec em260
*/
/** nHOST_IN */
#define HOST_IN_DDR		DDRD
#define HOST_IN_PIN		PIND
#define HOST_IN_PORT	PORTD
#define HOST_IN_BIT		2

/** nReset */
#define RSTB_DDR	DDRD
#define RSTB_PIN	PIND
#define RSTB_PORT	PORTD
#define RSTB_BIT	3

/** nWake_Up */
#define WAKE_UP_DDR		DDRB
#define WAKE_UP_PIN		PINB
#define WAKE_UP_PORT	PORTB
#define WAKE_UP_BIT		1

#define DEVICE_ID E_DEVICE_RX_2_WAY // TX
#define DEVICE_VERSION 0x00

/************************************************************************/
/* SERVOMOTEUR                                                          */
/************************************************************************/

/** 2 servo branche sur PC0 et PC1 */
#define APP_SERVO_NB_SERVO		2
extern SAppServo app_servo[APP_SERVO_NB_SERVO];

#define APP_SERVO_NB_PORT_USED	1
#define APP_SERVO_PORT_0_DDR	DDRC
#define APP_SERVO_PORT_0_PIN	PINC
#define APP_SERVO_PORT_0_PORT	PORTC

#endif /* BOARD_H_ */